﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Summary.master" AutoEventWireup="true"
    CodeFile="CourseManager.aspx.cs" Inherits="School_CourseManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="DetailHeaderContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="DetailBodyContent" runat="Server">
    <asp:UpdatePanel runat="server" ID="uplSubject">
        <ContentTemplate>
            <ajaxToolkit:TabContainer ID="tbcSubject" Visible="false" runat="server" ActiveTabIndex="0"
                Width="880px">
                <ajaxToolkit:TabPanel runat="server" HeaderText="Subject" ID="tbcSubject_Info">
                    <HeaderTemplate>
                        <img src="../Images/Icons/16/Briefcase-icon.png" class="tab_header_img" title="School Info"
                            alt="Entity" />
                        Subject Info
                    </HeaderTemplate>
                    <ContentTemplate>
                        <asp:UpdatePanel runat="server" ID="uplSubjectForm" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:ValidationSummary ID="vsSubjectForm" ShowSummary="false" runat="server" />
                                <asp:HiddenField ID="hidSubjectID" Value="-1" runat="server" />
                                <asp:Panel runat="server" ID="pnlSubjectForm" BackColor="#ffffcc">
                                    <table width="100%" cellpadding="3">
                                        <tr>
                                            <td>
                                                Name
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtSubjectName" runat="server" Text="" MaxLength="255" Width="450px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvSubjectName"
                                                    ControlToValidate="txtSubjectName" ErrorMessage="Require subject name." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="Subject" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceSubjectName" TargetControlID="rfvSubjectName"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Short Name
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtSubjectShortName" runat="server" Text="" MaxLength="10" Width="212px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvSubjectShortName"
                                                    ControlToValidate="txtSubjectShortName" ErrorMessage="Require short name." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="Subject" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceSubjectShortName" TargetControlID="rfvSubjectShortName"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:Button runat="server" CausesValidation="true" ValidationGroup="Subject" CssClass="submitButton"
                                                    ID="btnSubjectSubmit" Text="Save" OnClick="btnSubjectSubmit_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <ajaxToolkit:RoundedCornersExtender ID="rceSubjectForm" runat="server" TargetControlID="pnlSubjectForm"
                                    Radius="10" Corners="All" BorderColor="Gray" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
            </ajaxToolkit:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel runat="server" ID="uplCourse">
        <ContentTemplate>
            <ajaxToolkit:TabContainer ID="tbcCourse" Visible="false" runat="server" ActiveTabIndex="0"
                Width="880px">
                <ajaxToolkit:TabPanel runat="server" HeaderText="Course" ID="tbcCourse_Info">
                    <HeaderTemplate>
                        <img src="../Images/Icons/16/Briefcase-icon.png" class="tab_header_img" title="School Info"
                            alt="Entity" />
                        Course Info
                    </HeaderTemplate>
                    <ContentTemplate>
                        <asp:UpdatePanel runat="server" ID="uplCourseForm" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:ValidationSummary ID="vsCourseForm" ShowSummary="false" runat="server" />
                                <asp:HiddenField ID="hidCourseID" Value="-1" runat="server" />
                                <asp:Panel runat="server" ID="pnlCourseForm" BackColor="#ffffcc">
                                    <table width="100%" cellpadding="3">
                                        <tr>
                                            <td>
                                                Name
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtCourseName" runat="server" Text="" MaxLength="255" Width="450px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCourseName"
                                                    ControlToValidate="txtCourseName" ErrorMessage="Require course name." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="Course" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCourseName" TargetControlID="rfvCourseName"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Short Name
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtCourseShortName" runat="server" Text="" MaxLength="10" Width="212px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCourseShortName"
                                                    ControlToValidate="txtCourseShortName" ErrorMessage="Require short name." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="Course" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCourseShortName" TargetControlID="rfvCourseShortName"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Grade Level
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCourseGradeLevel" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCourseGradeLevel"
                                                    ControlToValidate="ddlCourseGradeLevel" ErrorMessage="Require grade level." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="Course" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCourseGradeLevel" TargetControlID="rfvCourseGradeLevel"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:Button runat="server" CausesValidation="true" ValidationGroup="Course" CssClass="submitButton"
                                                    ID="btnCourseSubmit" Text="Save" OnClick="btnCourseSubmit_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <ajaxToolkit:RoundedCornersExtender ID="rceCourseForm" runat="server" TargetControlID="pnlCourseForm"
                                    Radius="10" Corners="All" BorderColor="Gray" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
            </ajaxToolkit:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel runat="server" ID="uplCoursePeriod">
        <ContentTemplate>
            <ajaxToolkit:TabContainer ID="tbcCoursePeriod" Visible="false" runat="server" ActiveTabIndex="0"
                Width="880px">
                <ajaxToolkit:TabPanel runat="server" HeaderText="CoursePeriod" ID="tbcCoursePeriod_Info">
                    <HeaderTemplate>
                        <img src="../Images/Icons/16/Briefcase-icon.png" class="tab_header_img" title="School Info"
                            alt="Entity" />
                        CoursePeriod Info
                    </HeaderTemplate>
                    <ContentTemplate>
                        <asp:UpdatePanel runat="server" ID="uplCoursePeriodForm" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:ValidationSummary ID="vsCoursePeriodForm" ShowSummary="false" runat="server" />
                                <asp:HiddenField ID="hidCoursePeriodID" Value="-1" runat="server" />
                                <asp:Panel runat="server" ID="pnlCoursePeriodForm" BackColor="#ffffcc">
                                    <table width="100%" cellpadding="3">
                                        <tr>
                                            <td>
                                                Name
                                            </td>
                                            <td colspan="3">
                                                <asp:TextBox ID="txtCoursePeriodName" runat="server" Text="" MaxLength="255" Width="650px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodName"
                                                    ControlToValidate="txtCoursePeriodName" ErrorMessage="Require CoursePeriod name."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodName" TargetControlID="rfvCoursePeriodName"
                                                    HighlightCssClass="validationError" Width="240px" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Short Name
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtCoursePeriodShortName" runat="server" Text="" MaxLength="10"
                                                    Width="212px"></asp:TextBox>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodShortName"
                                                    ControlToValidate="txtCoursePeriodShortName" ErrorMessage="Require short name."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodShortName"
                                                    TargetControlID="rfvCoursePeriodShortName" HighlightCssClass="validationError"
                                                    PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Teacher
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodTeacher" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="David Roger" Value="1" />
                                                    <asp:ListItem Text="Tom Harry" Value="2" />
                                                    <asp:ListItem Text="Mary Jane" Value="3" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodTeacher"
                                                    ControlToValidate="ddlCoursePeriodTeacher" ErrorMessage="Require teacher." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodTeacher"
                                                    TargetControlID="rfvCoursePeriodTeacher" HighlightCssClass="validationError"
                                                    PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Room
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodRoom" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="Room 1" Value="1" />
                                                    <asp:ListItem Text="Room 2" Value="2" />
                                                    <asp:ListItem Text="Room 3" Value="3" />
                                                    <asp:ListItem Text="Room 4" Value="4" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodRoom"
                                                    ControlToValidate="ddlCoursePeriodRoom" ErrorMessage="Require Room." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodRoom" TargetControlID="rfvCoursePeriodRoom"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Asst: Teacher
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodAssTeacher" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="Amy Lynn" Value="4" />
                                                    <asp:ListItem Text="John Kim" Value="5" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodAssTeacher"
                                                    ControlToValidate="ddlCoursePeriodAssTeacher" ErrorMessage="Require assistand teacher."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodAssTeacher"
                                                    TargetControlID="rfvCoursePeriodAssTeacher" HighlightCssClass="validationError"
                                                    PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                No. Of Seats
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtCoursePeriodSeatNo" MaxLength="6" />
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodSeatNo"
                                                    ControlToValidate="txtCoursePeriodSeatNo" ErrorMessage="Require no. of seat."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodSeatNo" TargetControlID="rfvCoursePeriodSeatNo"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Credits
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtCoursePeriodCredit" MaxLength="6" />
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodCredit"
                                                    ControlToValidate="txtCoursePeriodCredit" ErrorMessage="Require credits" Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodCredit" TargetControlID="rfvCoursePeriodCredit"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Period
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodPeriod" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="Period 1" Value="1" />
                                                    <asp:ListItem Text="Period 2" Value="2" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodPeriod"
                                                    ControlToValidate="ddlCoursePeriodPeriod" ErrorMessage="Require period." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodPeriod" TargetControlID="rfvCoursePeriodPeriod"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Grade Scale
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodGradeScale" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="Main" Value="1" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodGradeScale"
                                                    ControlToValidate="ddlCoursePeriodGradeScale" ErrorMessage="Require Grade Scale."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodGradeScale"
                                                    TargetControlID="rfvCoursePeriodGradeScale" HighlightCssClass="validationError"
                                                    PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Gender Restriction
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodGenderRestriction" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="Male" Value="1" />
                                                    <asp:ListItem Text="Female" Value="2" />
                                                    <asp:ListItem Text="Both" Value="0" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodGenderRestriction"
                                                    ControlToValidate="ddlCoursePeriodGenderRestriction" ErrorMessage="Require period."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodGenderRestriction"
                                                    TargetControlID="rfvCoursePeriodGenderRestriction" HighlightCssClass="validationError"
                                                    PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Calendar
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodCalendar" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="BEHS 13, 2014 Calendar" Value="1" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodCalendar"
                                                    ControlToValidate="ddlCoursePeriodCalendar" ErrorMessage="Require Grade Scale."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodCalendar"
                                                    TargetControlID="rfvCoursePeriodCalendar" HighlightCssClass="validationError"
                                                    PopupPosition="Right" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Parent Course Period
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlCoursePeriodParent" runat="server" Width="212px">
                                                    <asp:ListItem Text="Select" Value="-1" />
                                                    <asp:ListItem Text="N/A" Value="0" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodParent"
                                                    ControlToValidate="ddlCoursePeriodParent" ErrorMessage="Require period." Text=""
                                                    ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodParent" TargetControlID="rfvCoursePeriodParent"
                                                    HighlightCssClass="validationError" PopupPosition="Right" />
                                            </td>
                                            <td>
                                                Days
                                            </td>
                                            <td colspan="3">
                                                <asp:CheckBoxList ID="chkDays" runat="server" RepeatDirection="Horizontal">
                                                    <asp:ListItem Text="S" Value="0" />
                                                    <asp:ListItem Text="M" Value="1" />
                                                    <asp:ListItem Text="T" Value="2" />
                                                    <asp:ListItem Text="W" Value="3" />
                                                    <asp:ListItem Text="H" Value="4" />
                                                    <asp:ListItem Text="F" Value="5" />
                                                    <asp:ListItem Text="S" Value="6" />
                                                </asp:CheckBoxList>
                                                <%--<asp:RequiredFieldValidator CssClass="validationErrorControl" runat="server" ID="rfvCoursePeriodDayList"
                                                    ControlToValidate="chkDays" ErrorMessage="Require days."
                                                    Text="" ForeColor="Red" Display="None" ValidationGroup="CoursePeriod" InitialValue="-1" />
                                                <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceCoursePeriodDayList"
                                                    TargetControlID="rfvCoursePeriodDayList" HighlightCssClass="validationError"
                                                    PopupPosition="Right" />--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="4">
                                                <asp:CheckBox runat="server" ID="chkTakeAttendence" Text="Take Attendence?" />
                                                <asp:CheckBox runat="server" ID="chkAffectClassRank" Text="Affect Class Rank?" />
                                                <asp:CheckBox runat="server" ID="chkAffectHonorRoll" Text="Affect Honor Roll?" />
                                                <asp:CheckBox runat="server" ID="chkCourseWeighted" Text="Course Weighted?" />
                                                <asp:CheckBox runat="server" ID="chkHalfDay" Text="Halfday?" />
                                                <asp:CheckBox runat="server" ID="chkAllowTeacherGradeScale" Text="Allow Teacher Grade Scale?" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <asp:Button runat="server" CausesValidation="true" ValidationGroup="CoursePeriod"
                                                    CssClass="submitButton" ID="btnCoursePeriodSubmit" Text="Save" OnClick="btnCoursePeriodSubmit_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <ajaxToolkit:RoundedCornersExtender ID="rceCoursePeriodForm" runat="server" TargetControlID="pnlCoursePeriodForm"
                                    Radius="10" Corners="All" BorderColor="Gray" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
            </ajaxToolkit:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel runat="server" ID="uplList">
        <ContentTemplate>
            <asp:Label runat="server" ID="lblMessage" ForeColor="Red" Font-Bold="true" />
            <table cellpadding="3" cellpadding="5">
                <tr>
                    <td valign="top">
                        <div runat="server" id="divSubjectList">
                            <asp:GridView CssClass="table" runat="server" ID="gvSubject" AutoGenerateColumns="false"
                                OnSelectedIndexChanged="gvSubject_SelectedIndexChanged" EmptyDataText="No subject."
                                Width="300px">
                                <Columns>
                                    <asp:BoundField DataField="SubjectID" HeaderText="" ControlStyle-CssClass="hidden"
                                        ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" SortExpression="SubjectID" />
                                    <asp:ButtonField HeaderText="Subject" ControlStyle-Width="290px" ButtonType="Link"
                                        CommandName="Select" DataTextField="SubjectName" ControlStyle-CssClass="GridColumn" />
                                </Columns>
                                <SelectedRowStyle BackColor="Yellow" />
                            </asp:GridView>
                            <br />
                            <asp:Button runat="server" CausesValidation="false" ValidationGroup="btnNewSubject_Click"
                                CssClass="submitButton" ID="btnNewSubject" Text="Add" OnClick="btnNewSubject_Click" />
                        </div>
                    </td>
                    <td valign="top">
                        <div runat="server" id="divCourseList" visible="false">
                            <asp:GridView CssClass="table" runat="server" ID="gvCourse" AutoGenerateColumns="false"
                                OnSelectedIndexChanged="gvCourse_SelectedIndexChanged" EmptyDataText="No course."
                                Width="300px">
                                <Columns>
                                    <asp:BoundField DataField="CourseID" HeaderText="" ControlStyle-CssClass="hidden"
                                        ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" SortExpression="CourseID" />
                                    <asp:BoundField DataField="SubjectID" HeaderText="" ControlStyle-CssClass="hidden"
                                        ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" SortExpression="SubjectID" />
                                    <asp:ButtonField HeaderText="Course" ButtonType="Link" CommandName="Select" DataTextField="CourseName" />
                                </Columns>
                                <SelectedRowStyle BackColor="Yellow" />
                            </asp:GridView>
                            <br />
                            <asp:Button runat="server" CausesValidation="false" ValidationGroup="btnNewCourse_Click"
                                CssClass="submitButton" ID="btnNewCourse" Text="Add" OnClick="btnNewCourse_Click" />
                        </div>
                    </td>
                    <td valign="top">
                        <div runat="server" id="divCoursePeriod" visible="false">
                            <asp:GridView CssClass="table" runat="server" ID="gvCoursePeriod" AutoGenerateColumns="false"
                                OnSelectedIndexChanged="gvCoursePeriod_SelectedIndexChanged" EmptyDataText="No course period."
                                Width="300px">
                                <Columns>
                                    <asp:BoundField DataField="CoursePeriodID" HeaderText="" ControlStyle-CssClass="hidden"
                                        ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" SortExpression="CoursePeriodID" />
                                    <asp:BoundField DataField="CourseID" HeaderText="" ControlStyle-CssClass="hidden"
                                        ItemStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" SortExpression="CourseID" />
                                    <asp:ButtonField HeaderText="Course Period" ButtonType="Link" CommandName="Select"
                                        DataTextField="PeriodName" />
                                </Columns>
                                <SelectedRowStyle BackColor="Yellow" />
                            </asp:GridView>
                            <br />
                            <asp:Button runat="server" CausesValidation="false" ValidationGroup="btnNewCoursePeriod_Click"
                                CssClass="submitButton" ID="btnNewCoursePeriod" Text="Add" OnClick="btnNewCoursePeriod_Click" />
                        </div>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
